/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class UltrasonicParkingSensor {
    static categoryCode = '040040009';

    static categoryName = '超声波车位检测器';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return UltrasonicParkingSensor.categoryCode;
    }

    get categoryName() {
        return UltrasonicParkingSensor.categoryName;
    }

    getDistanceDetection(params) {
        return command({
            method: 'getDistanceDetection',
            methodId: 'pDNVDQ0z',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getDriveinDelay(params) {
        return command({
            method: 'getDriveinDelay',
            methodId: 'pGegeeZR',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getDriveoutDelay(params) {
        return command({
            method: 'getDriveoutDelay',
            methodId: 'p1RY46hW',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getParkingStatus(params) {
        return command({
            method: 'getParkingStatus',
            methodId: 'pgyAbBcI',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getParkingType(params) {
        return command({
            method: 'getParkingType',
            methodId: 'phU63wvE',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setDistanceDetection(params) {
        return command({
            method: 'setDistanceDetection',
            methodId: 'pUjL70R1',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setDriveinDelay(params) {
        return command({
            method: 'setDriveinDelay',
            methodId: 'pes4SRPq',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setDriveoutDelay(params) {
        return command({
            method: 'setDriveoutDelay',
            methodId: 'ppbbd4nk',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setParkingType(params) {
        return command({
            method: 'setParkingType',
            methodId: 'pZwpBgxo',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default UltrasonicParkingSensor;
